LAYER - Positioned HTML Content

Netscape Navigator Only

Syntax:

<LAYER>...</LAYER>

Attribute Specifications

ID=string
SRC=string
WIDTH=Length (image width)
HEIGHT=Length
ABOVE=string
BELOW=string
TOP=Length
LEFT=Length
BACKGROUND=url
BGCOLOR=Color
CLIP=Coords
VISIBILITY=[ SHOW | HIDDEN | INHERIT ]
Z-INDEX= integer
SCRIPTING EVENTS=string

Description:

"This tag allows you to position blocks of contents. These blocks of positioned content are also called layers. Navigator 4.0 Positioned blocks of content can overlap each other, be transparent or opaque, and be visible or invisible. They can also be nested. Use the LAYER tag to specify an absolute position for a block of content, and use the ILAYER tag to specify a relative position. In addition to using the LAYER tag to define positions for blocks of content, you can also use cascading style sheet syntax..."

(From the Netscape DevEdge Online Documentation HTML Tag Reference.)

SRC

"... specifies the pathname of a file that contains HTML-formatted content for the layer."

(From the Netscape DevEdge Online Documentation HTML Tag Reference.)

WIDTH

"... specifies the width of the layer's content. It controls the right margin for wrapping purposes. The value can be expressed as an integer pixel value or as a percentage of the width of the containing layer."

(From the Netscape DevEdge Online Documentation HTML Tag Reference.)

HEIGHT

"...specifies the height of the layer's clipping region and serves as the reference for setting the relative height of children layers. The value can be expressed as an integer pixel value or as a percentage of the height of the containing layer (or of the window for a top-level layer)."

(From the Netscape DevEdge Online Documentation HTML Tag Reference.)

ID

"...specifies the name of the layer, enabling other layers and JavaScript scripts to refer to it."

(From the Netscape DevEdge Online Documentation HTML Tag Reference.)

ABOVE

"...specifies the layer immediately on top of a newly created layer in the stacking order; that is, the new layer is created just below the layer specified by layername. The use of this attribute cannot be combined with the use of the BELOW or Z-INDEX attributes."

(From the Netscape DevEdge Online Documentation HTML Tag Reference.)

BELOW

"...identifies the layer immediately beneath the newly created layer in the stacking order; that is, the new layer is created just above the layer specified by layername. The named layer must already exist. The use of this attribute cannot be combined with the use of the ABOVE or Z-INDEX attributes. "

(From the Netscape DevEdge Online Documentation HTML Tag Reference.)

BACKGROUND

"... specifies an image to use as the background."

(From the Netscape DevEdge Online Documentation HTML Tag Reference.)

BGCOLOR

"... specifies the background color of the layer. See Color Units for information about color values."

(From the Netscape DevEdge Online Documentation HTML Tag Reference.)

CLIP

"... specifies the clipping rectangle (viewable area) of the layer, which can be less than the width and height of the content of the layer. The value is a set of four numbers. Each of the four values represents numbers of pixels."

(From the Netscape DevEdge Online Documentation HTML Tag Reference.)

LEFT and TOP

"... specify the horizontal and vertical positions of positioned layers or the relative horizontal and vertical positions for inflow layers."

(From the Netscape DevEdge Online Documentation HTML Tag Reference.)

Z-INDEX

"... specifies the stacking order of a layer. Allows a layer's z-order to be specified in terms of an integer. Layers with higher numbered values are stacked above those with lower ones. Only positive Z-INDEX values are allowed. The use of this attribute cannot be combined with the use of the ABOVE or BELOW attributes."

(From the Netscape DevEdge Online Documentation HTML Tag Reference.)

VISIBILITY

"... specifies whether the layer is visible or not. A value of SHOW shows the layer. A value of HIDDEN hides the layer. A value of INHERIT causes the layer to have the same visiblity as its parent layer."

(From the Netscape DevEdge Online Documentation HTML Tag Reference.)

Scripting Events

A number of attributes that define client-side scripting events are common to most elements. The attribute value is a script--typically a function call or a few short statements--that is executed when the event occurs. The value may contain entities (e.g., &quot;).

The following example features JavaScript code to handle two events of a submit button, giving the user a reminder in the status bar when the mouse moves over the button and clearing the status bar when the mouse moves away. Note that the attribute values are delimited by single quotes since double quotes are used within them.

<INPUT TYPE=submit ONMOUSEOVER='window.status="Did you fill in all required fields?";' ONMOUSEOUT='window.status="";'>

When an event attribute is used, a default scripting language must be specified for the document by setting the Content-Script-Type HTTP header to the media type of the scripting language. The previous example could use the following META element in the document's HEAD:

<META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">

The common event attributes are device-dependent and largely tailored for the graphical user interface. The available events are as follows:

More Information


Sausage Software and the Web Design Group

Copyright © 1998 Sausage Software & Liam Quinn. All rights reserved.

Maintained by Jarrod Durnan